package pzl.kt.study.base

//操作符重载函数  操作符 ><
//用 、＞＝、＜、＜＝这 个操作符进
class Member(var name: String, var level: Int) {

    operator fun compareTo(other: Member): Int {
        return when {
            other.level > level -> -1
            other.level < level -> 1
            else -> 0
        }
    }

}